<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@ page isELIgnored="false" %>
<%
	String path_part = request.getContextPath();
	String basePathter = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path_part + "/";
%>
<div class="wbs_scroll" style="height:23px;">
   <table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridview">
         <thead>
                <tr class="title">
                    <td style="width:5%">序号</td>
                    <td style="width:65%">工作内容</td>
                    <td style="width:15%">日期</td>
                    <td style="width:10%">编写人</td>
                    <td style="width:5%">操作</td>
                </tr>
        </thead>
	</table>
</div>

   <div class="wbs_scroll" style="height:380px;" >
			<table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridview" id="sale_saleChance_table">
				<tbody class="mytbody">
                	<s:if test="listLog.size()==0">
                		<tr>
                			<td colspan="5" align="center">无记录</td>
                		</tr>
                	</s:if>
                	<s:else>
		                <s:iterator value="listLog" status="stat">
			                <tr <s:if test="#stat.odd"> class="odd_title" </s:if><s:else>class="even_title "</s:else>>
			                 	<td style="width:5%"><s:property value="#stat.count"/></td>
			                    <td style="width:65%"><s:property value="content"/></td>
			                    <td style="width:15%"><s:property value="createDate"/></td>
			                    <td style="width:10%"><s:property value="user.cname"/></td>
			                    <td style="width:5%">
				                    <s:if test="user.id == #session.user.userId">
					                    	<a class="icon_tools menu_arrow_down" href="javascript:void(0);" onClick="openmenu(this , 'gotoLogMenu.action?personLogVo.id=${id}&personLogVo.user.id=${user.id}');">▼</a>
				                    </s:if>
				                    <s:else>
				                    		无
				                    </s:else>
			                    </td>
			                </tr>
		                </s:iterator>
                	</s:else>
                </tbody>
           </table>
	<%@include file="../../../common/jsp/pageing.jsp" %>
</div>
<script>
	// 文本超过8个字符数时，用省略显示
		text_overflow( 10 );
	 	//查询方法
		function searchPersonLogBySearchKey(){
			var logDay = document.getElementById("logDay").value;
			if(isNumber(logDay)){
				var userId = document.getElementById("users").value;
				var url = '<%=basePathter%>person/getPersonLogByUidAndDate.action?flag=search&time='+new Date()+'&logDay='+logDay+'&userId='+userId;
				location.href = url;
			}else{
				alert('查询参数不合法！！');
			}
		}
        // 分页
		function gotoPage( pageNo , totalPage , pageSize ){
			// 按page的信息加载数据
			// 如果当前页大于了最大页数就弹出警告
			var userId = document.getElementById('users').value;
			if( pageNo > totalPage ){
				window.alert( '总页数为'+totalPage+' , 请重新输入页码!' );
				return;
			}
			// 加载数据
			location.href='<%=basePathter%>person/getPersonLogByUidAndDate.action?userId='+userId+'&page.pageNo='+pageNo+'&page.totalPage='+totalPage+'&page.pageSize='+pageSize+'&logDay=<s:property value="logDay"/>';
		}
</script>